home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / DSKA / dska.doc < prev    next >
Encoding:
Text File  |  1994-11-07  |  8.3 KB  |  203 lines  |  [TEXT/ttxt]

  1. DSKA - a Macintosh based TMS3202x assembler
  2.  
  3. User Interface by Eric Brombaugh (ericb@sicom.com)
  4. version 1.2   9-26-94
  5. Assembler by Lloyd Miller ( lloyd@lfmcal.cuc.ab.ca)
  6. version 0.16
  7.  
  8. INTRO
  9. This program is a simple assembler for the Texas Instruments TMS3202x family
  10. of Digital Signal Processors.  It is intended for use with the program dskL by
  11. Gerrit Polder, which can be used to download the assembled code to the TI DSK
  12. development system.
  13.  
  14. USAGE
  15. The user interface is extremely simple.  To assemble a source file,  select your
  16. text file in the File->Open menu.  Then select File->Assemble.  A console I/O
  17. window will open indicating the progress of the assembly.  If there are errors,
  18. they will be listed in this window.  Successful assembly will be noted here as
  19. well.  If you have corrected errors, you may re-assemble the source text by
  20. choosing File->Assemble again, without first going to the File->Open menu.
  21.  
  22. The File->Preferences item allows you to customize the .xxx extension of your
  23. resulting binary output file and listing file.  The defaults are .dsk for the binary
  24. file, and .lst for the listing file.  You may also change the size (row, column) of
  25. the console I/O window.  Note that the contents of the console I/O window will
  26. be lost if you click OK in the preferences dialog.
  27.  
  28. The file type of both of the output files is 'TEXT', so they may be viewed with
  29. TeachText or SimpleText.  The creator of the binary file has been set to dskL,
  30. which will allow you to load the binary file into Gerrit Polder's dskL application
  31. simply by double-clicking on the file in the Finder.
  32.  
  33. FILES
  34. The following files should be included with this archive:
  35.  
  36. 1)    DSKA                                The assembler application.
  37. 2)  dska.doc                        This documentation file.
  38. 3)  hostspec.asm        A spectrum analyzer which plots on the host computer.
  39. 4)  mmregs.inc            An include file which defines symbols for the TMS320c26 registers.
  40. 5)  dsk_twid.inc        An include file which defines sine/cosines for an fft.
  41. 6)  TESTF.ASM                An assembler test file.
  42.  
  43. HISTORY
  44. Rev 1.2  10/15/94
  45. Updated assembler code to version 0.17. 
  46.  
  47. Rev 1.1  10/10/94
  48. Updated assembler code to version 0.16.  Added GetNextEvent during
  49. assembly to allow multitasking.
  50.  
  51. Rev 1.0  
  52. Initial release.
  53.  
  54. NOTES
  55. There are a few things about this program which could be better, command keys
  56. would be nice for instance but were left out because they conflict with the Think C
  57. console interface.  A nice help system would be good, but doesn't really add to
  58. the functionality.
  59.  
  60. If you have any bug-reports or problems with this application, please let me know.
  61. Don't bother Lloyd, as he cannot support the Macintosh version.
  62.  
  63. THANKS
  64. Thanks go to Lloyd Miller of course, for his clearly written assembler code.  This
  65. program would simply not exist without his original work.  Gerrit Polder helped
  66. immensely in the beta-test of this code, as well as providing motivation for
  67. doing it in the first place.  Ron Parsons of TAPR helped debug some assembler
  68. errors after the initial release.
  69.  
  70. LEGAL
  71. This program is freeware.  Use it, but don't sell it.
  72.  
  73. Enjoy!
  74.  
  75. Eric Brombaugh
  76. ericb@sicom.com
  77. emeb@indirect.com
  78. Sept. 26, 1994
  79.  
  80. ADDITIONAL INFO
  81. The following are docs from Lloyd Miller pertaining to his dska.c assembler.  Since
  82. the Macintosh version of dska is based on his code, I have included it here.
  83. --------------------------------------------------------------------------
  84. Some random notes regarding the dska.c dsp starters kit assembler
  85. unofficial replacement I have created. This kinda assumes you have a TI
  86. DSP Starters' kit and you have tried to use their assembler.
  87.  
  88. Features this assembler has that the standard dska.exe that comes free
  89. with the DSK did not have:
  90.  
  91.  simple arithmetic expressions (+-*/ and ()s)
  92.  nested include files
  93.  nested .if/.else/.endif
  94.  free source code
  95.  Linux compatibility (actually general portability but I haven't tested
  96. it that much to make that claim)
  97.  second pass listing showing actual generated code offsets
  98.  
  99. Features this assembler lacks that the standard dska.exe had:
  100.  
  101. The command line option to define symbols.
  102.  
  103.  
  104.  
  105. To use this assembler, you will probably need to compile it yourself
  106. since I only give out source code. You have to link with the math
  107. library probably (-lm).
  108.  
  109. I compile it regularly on Linux with GCC and occasionally on MS-DOS
  110. with Borland's Turbo-C 2.0.
  111.  
  112. To run the assembler the command line is:
  113.  
  114.   dska source.asm binout.dsk listout.lst
  115.  
  116. The arguments are file names.
  117.   source.asm is your input file.
  118.   binout.dsk is the output binary in .dsk format just like the TI
  119. assembler
  120.   listout.lst is the output listing file much like the TI assembler but
  121. I think it is better
  122.  
  123. If you do not want one of the output files then use /dev/null (or NUL:
  124. on MS-DOS).
  125.  
  126. The .dsk binary file format is pretty stupid but we have to use it to be
  127. able to cooperate with the debugger and stuff.
  128.  
  129.  
  130. You should be able to use an expression combining numbers and symbols
  131. anywhere that you could use a number or a symbol before. The obvious
  132. exception is the dumb expressions as labels that TI tries to call a
  133. feature in their assembler. You can only have plain symbol names in the
  134. label positions of lines.
  135.  
  136. The colons (":") on labels are optional. Labels and only labels start
  137. in column one. Comments can also start in column one. Either a ";" or a
  138. "*" in column one makes the whole line into a comment. "*" not in
  139. column one will generally just be an error if it doen't make sense as a
  140. multiplication. Anything else must be preceded by a space or a tab.
  141. Labels must be separated from the operation field by a space or a tab.
  142.  
  143. The nasty restrictions they claim for the conditional assembly
  144. expression is of course totally relaxed.
  145.  
  146. I think you could use an external macro processor such as m4 but it
  147. would mean the line numbers wouldn't mean much any more. Perhaps someday
  148. the assembler could recognize embeded #line operations.
  149.  
  150. One place you cannot (yet) use expressions is the floating point values
  151. for the .qxx, .lqxx, .float, .double, .bfloat, and .efloat directives.
  152.  
  153. Ordinary labels cannot be redefined but labels on .set directives can be
  154. redefined at will.
  155.  
  156. Forward references are generally OK in the instruction operands and
  157. data lists but if you try hard enough you can get things confused
  158. between the values found for pass 1 and pass 2. The assembler might
  159. missleadingly claim you are trying to redefine labels in pass 2.
  160.  
  161. The listings show only the first two words of generated object code for
  162. each line. Do not be concerned if you want more than two words of data
  163. generated for a .word, .byte, .string, or one of the floating point
  164. formats that generates more than two words. The .dsk file will be fine
  165. even though the listing only shows the first two words. You can see the
  166. data in the .dsk file itself or you can examine the memory with the
  167. debugger. Perhaps I will fix this someday if I can figure out a nice
  168. way to do it.
  169.  
  170. A lot of the error messages are repeated the same on both passes.
  171.  
  172. Error messages in the listing file will generally PRECEDE the line they
  173. refer to.
  174.  
  175. "$ .set nnnn" is allowed but doesn't accomplish anything. The symbol
  176. "$" is reset to the current assmbly address for every line of the
  177. assembly. Using "$" as a label will produce lots of wierd error
  178. messages.
  179.  
  180. I make no effort to pass judgment on the severity of conditions
  181. detected. Error messages are not classified into warnings and fatals.
  182.  
  183. Lines skipped with .if can produce error messages while trying to
  184. decode opcode fields looking for .endif. .else or nested .ifs. This
  185. just means you should only use conditional assembly for actual code. To
  186. skip over comment blocks or other lines which should never be assembled
  187. use regular comment lines, not conditional assembly.
  188.  
  189. If you look at the structure of the assembler itself, you will find it
  190. is pretty straight forward. Pass_1 and pass_2 contain mainly a giant
  191. switch statement each based on the statement we are working on. There
  192. is lots of code duplicated which might better have been in common
  193. functions. This design resulted from seat-of-the-pants design while
  194. coding and edit mark block and copy, not from any deep conviction that
  195. it is right. The look up of the operation and the symbols are ultra
  196. simple linear searching. Hashing or sorting seemed like more trouble
  197. than they were worth. Tables have hard (but I think generous) limits
  198. that require editing the source and recompiling to change.
  199.  
  200. Lloyd Miller
  201. lloyd@lfmcal.cuc.ab.ca
  202. 1994 May 23 .. June 21
  203.